package net.zyj.student.mapper;

import java.util.List;
import org.apache.ibatis.session.SqlSession;
import net.zyj.student.pojo.Teacher;

public class ClassMapper {
	/**
	 * 根据教师的编号查询所管理的班级信息
	 * @param teacherid
	 * @return
	 */
	public List<Teacher> selectByTeacherid(Integer teacherid) {
		SqlSession session = DBSessionFactory.getSqlSessionFactory().openSession();
		try {
			return session.selectList("net.zyj.student.mapper.ClassMapper.selectByTeacherid",teacherid);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
